Integrand size = 21, antiderivative size = 98 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac {2^{-\frac {1}{2}+n} n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{2}-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3960, 3913, 3912, 71} \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\frac {2^{n-\frac {1}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{2}-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x))\right )}{d}-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d} \]
[In]
[Out]
Rule 71
Rule 3912
Rule 3913
Rule 3960
Rubi steps \begin{align*} \text {integral}& = -\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+(a n) \int \sec (c+d x) (a+a \sec (c+d x))^{-1+n} \, dx \\ & = -\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\left (n (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec (c+d x) (1+\sec (c+d x))^{-1+n} \, dx \\ & = -\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}-\frac {\left (n (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1+x)^{-\frac {3}{2}+n}}{\sqrt {1-x}} \, dx,x,\sec (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}} \\ & = -\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac {2^{-\frac {1}{2}+n} n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{2}-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \\ \end{align*}
Time = 1.51 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.45 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=-\frac {2^{-1+n} \left (\cot ^2\left (\frac {1}{2} (c+d x)\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},n,\frac {1}{2},\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},n,\frac {3}{2},\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^n \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^n (1+\sec (c+d x))^{-n} (a (1+\sec (c+d x)))^n \tan \left (\frac {1}{2} (c+d x)\right )}{d} \]
[In]
[Out]
\[\int \csc \left (d x +c \right )^{2} \left (a +a \sec \left (d x +c \right )\right )^{n}d x\]
[In]
[Out]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \csc ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^2} \,d x \]
[In]
[Out]